<?php
/**
 * @version      BOSSCMS-Free
 * @trademark    BOSSCMS
 * @copyright    Copyright © by BOSSCMS-Free (https://www.bosscms.net/) 保留所有权利
 * @license      https://gitee.com/Greenpeas/BOSSCMS/license/ 和 https://www.bosscms.net/freelicense/
 * @link         https://www.bosscms.net/
 * @author       温州软界网络技术有限公司
**/
defined('IS_OK') or exit('Access Forbidden');

into::basic_class('admin');

class content extends admin
{
	public function init()
	{
		global $G;
		$G['cover'] = $this->cover();
		$url = '';
		$items = page::items();
		foreach($items as $v){
			if($v['type']==1){
				$url = url::mpf('items','content','edit',array('id'=>$v['id']));
				break;
			}
		}
		if(!$url){
			$ctrl = load::ctrl();
			foreach($ctrl as $core=>$series){
				if($series[88]){
					$url = url::mpf('layers','layers','init',array('core'=>$core));
					break;
				}
			}
		}
		if($url){
			setcookie('iframeContentTreeScroll','0',TIME-1,'/');
			location($url);
		}else{
			alert('没有内容栏目管理',url::mpf('items','items','init'));
		}
	}
}
?>